//
// Created by xili on 2024/7/30 11:52.
// Go big or go home.
//
#include <vector>
#include <climits>

using namespace std;

class Solution {
public:
    int buyChoco(vector<int> &prices, int money) {
        int min = 101;
        int second = 101;
        for (auto &item: prices) {
            if (item < min) {
                second = min;
                min = item;
            } else if (item < second) {
                second = item;
            }
        }
        return money - (min + second) >= 0 ? money - (min + second) : money;
    }
};